/*
 * Decompiled with CFR 0.150.
 * 
 * Could not load the following classes:
 *  cn.hutool.core.collection.CollUtil
 *  cn.hutool.core.util.ObjectUtil
 *  cn.hutool.core.util.StrUtil
 *  com.alibaba.fastjson.JSON
 *  de.felixroske.jfxsupport.FXMLController
 *  javafx.beans.value.ChangeListener
 *  javafx.beans.value.ObservableValue
 *  javafx.collections.FXCollections
 *  javafx.collections.ObservableList
 *  javafx.fxml.FXML
 *  javafx.fxml.FXMLLoader
 *  javafx.fxml.Initializable
 *  javafx.scene.Parent
 *  javafx.scene.Scene
 *  javafx.scene.control.Alert
 *  javafx.scene.control.Alert$AlertType
 *  javafx.scene.control.ChoiceBox
 *  javafx.scene.control.ScrollPane
 *  javafx.scene.control.TextArea
 *  javafx.scene.control.TextField
 *  javafx.scene.layout.VBox
 *  javafx.stage.Modality
 *  javafx.stage.Stage
 *  javafx.util.StringConverter
 *  org.springframework.beans.factory.annotation.Autowired
 */
package com.gys.controller.rechargecard;

import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSON;
import com.gys.common.business.RechargeCardUtil;
import com.gys.common.data.HttpJson;
import com.gys.common.util.CommonUtil;
import com.gys.common.util.SpringUtil;
import com.gys.common.util.ValidationUtil;
import com.gys.controller.BaseController;
import com.gys.controller.rechargecard.MemberCardQueryController;
import com.gys.controller.rechargecard.RechargePayController;
import com.gys.data.enumclass.RechargeCardStatus;
import com.gys.data.enumclass.RechargeType;
import com.gys.data.enumclass.Sex;
import com.gys.data.rechargecard.RechargeCardInData;
import com.gys.data.rechargecard.RechargeCardOutData;
import com.gys.data.rechargecard.RechargeCardPaycheckInData;
import com.gys.data.rechargecard.RechargeCardSetOutData;
import com.gys.data.rechargecard.RechargeProportion;
import com.gys.view.rechargecard.IndexView;
import de.felixroske.jfxsupport.FXMLController;
import java.io.IOException;
import java.math.BigDecimal;
import java.net.URL;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.ResourceBundle;
import javafx.beans.value.ChangeListener;
import javafx.beans.value.ObservableValue;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
import javafx.fxml.FXML;
import javafx.fxml.FXMLLoader;
import javafx.fxml.Initializable;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.scene.control.Alert;
import javafx.scene.control.ChoiceBox;
import javafx.scene.control.ScrollPane;
import javafx.scene.control.TextArea;
import javafx.scene.control.TextField;
import javafx.scene.layout.VBox;
import javafx.stage.Modality;
import javafx.stage.Stage;
import javafx.util.StringConverter;
import org.springframework.beans.factory.annotation.Autowired;

@FXMLController
public class RechargecardController
extends BaseController
implements Initializable {
    @FXML
    private ScrollPane scrollPane;
    @FXML
    private VBox vBox;
    @FXML
    private TextField gsrcIdSave;
    @FXML
    private TextField gsrcNameSave;
    @FXML
    private TextField gsrcMobileSave;
    @FXML
    private ChoiceBox<Sex> gsrcSexSave;
    @FXML
    private TextField gsrcTelSave;
    @FXML
    private TextArea gsrcAddressSave;
    @FXML
    private TextField gsrcIdQuery;
    @FXML
    private TextField gsrcNameQuery;
    @FXML
    private TextField gsrcMobileQuery;
    @FXML
    private ChoiceBox<RechargeProportion> gsrcpProportionSave;
    @FXML
    private TextField gsrcpPayAmtSave;
    @FXML
    private TextField gsrcpAfterAmtSave;
    @FXML
    private ChoiceBox<RechargeType> rechargeTypeSave;
    @FXML
    private TextField gsrcpBeforeAmtSave;
    @FXML
    private TextField gsrcpRechargeAmtSave;
    @FXML
    private TextField gsrcIdModify;
    @FXML
    private TextField cardStatus;
    @Autowired
    private RechargePayController rechargePayController;
    private Stage stg;
    private boolean isForward;
    private boolean save = true;

    public void initialize(URL location, ResourceBundle resources) {
        this.scrollPane.setPrefWidth(this.getContentWidth());
        this.scrollPane.setPrefHeight(this.getContentHeight());
        this.vBox.setPrefWidth(this.getContentWidth());
        this.vBox.setPrefHeight(this.getContentHeight());
        Alert alert = this.createAlert(Alert.AlertType.INFORMATION, "\u63d0\u793a\u4fe1\u606f", null);
        ObservableList sexType = FXCollections.observableArrayList((Object[])new Sex[]{Sex.MALE, Sex.FEMALE});
        this.gsrcSexSave.setItems(sexType);
        this.gsrcSexSave.converterProperty().set(new StringConverter<Sex>(){

            public String toString(Sex object) {
                return object.getName();
            }

            public Sex fromString(String string) {
                return null;
            }
        });
        HttpJson res = RechargeCardUtil.getSetData();
        if (res.isSuccess()) {
            RechargeCardSetOutData outData = (RechargeCardSetOutData)JSON.parseObject((String)res.getMsg(), RechargeCardSetOutData.class);
            if (StrUtil.isBlank((CharSequence)outData.getGsrcsProportion1())) {
                outData.setGsrcsProportion1("100");
            }
            if (StrUtil.isBlank((CharSequence)outData.getGsrcsMinAmt1())) {
                outData.setGsrcsMinAmt1("1");
            }
            ArrayList<RechargeProportion> proportions = new ArrayList<RechargeProportion>();
            proportions.add(new RechargeProportion(outData.getGsrcsProportion1(), StrUtil.format((CharSequence)"\u6bd4\u4f8b1({}%)", (Object[])new Object[]{outData.getGsrcsProportion1()}), outData.getGsrcsMinAmt1()));
            if (StrUtil.isNotBlank((CharSequence)outData.getGsrcsProportion2()) && StrUtil.isNotBlank((CharSequence)outData.getGsrcsMinAmt2())) {
                proportions.add(new RechargeProportion(outData.getGsrcsProportion2(), StrUtil.format((CharSequence)"\u6bd4\u4f8b2({}%)", (Object[])new Object[]{outData.getGsrcsProportion2()}), outData.getGsrcsMinAmt2()));
            }
            if (StrUtil.isNotBlank((CharSequence)outData.getGsrcsProportion3()) && StrUtil.isNotBlank((CharSequence)outData.getGsrcsMinAmt3())) {
                proportions.add(new RechargeProportion(outData.getGsrcsProportion3(), StrUtil.format((CharSequence)"\u6bd4\u4f8b3({}%)", (Object[])new Object[]{outData.getGsrcsProportion3()}), outData.getGsrcsMinAmt3()));
            }
            this.gsrcpProportionSave.getItems().addAll(proportions);
            this.gsrcpProportionSave.converterProperty().set(new StringConverter<RechargeProportion>(){

                public String toString(RechargeProportion object) {
                    return object.getName();
                }

                public RechargeProportion fromString(String string) {
                    return null;
                }
            });
        } else {
            alert.setContentText(res.getMsg());
            alert.showAndWait();
        }
        ObservableList rechargeTypeOptions = FXCollections.observableArrayList((Object[])new RechargeType[]{RechargeType.NORMAL, RechargeType.PROMOTION});
        this.rechargeTypeSave.setItems(rechargeTypeOptions);
        this.gsrcpPayAmtSave.textProperty().addListener((ChangeListener)new ChangeListener<String>(){

            public void changed(ObservableValue<? extends String> observable, String oldValue, String newValue) {
                RechargecardController.this.showAmt();
            }
        });
    }

    @FXML
    private void saveCardInfo() {
        String gsrcId = this.gsrcIdSave.getText();
        String gsrcName = this.gsrcNameSave.getText();
        String gsrcMobile = this.gsrcMobileSave.getText();
        String gsrcSex = "";
        if (ObjectUtil.isNotNull(this.gsrcSexSave.getValue())) {
            gsrcSex = ((Sex)(this.gsrcSexSave.getValue())).getId();
        }
        String gsrcTel = this.gsrcTelSave.getText();
        String gsrcAddress = this.gsrcAddressSave.getText();
        Alert alert = this.createAlert(Alert.AlertType.INFORMATION, "\u63d0\u793a\u4fe1\u606f", null);
        if (StrUtil.isBlank((CharSequence)gsrcId)) {
            alert.setContentText("\u672a\u67e5\u8be2\u5230\u76f8\u5173\u50a8\u503c\u5361");
            alert.showAndWait();
            return;
        }
        if (StrUtil.isBlank((CharSequence)gsrcName)) {
            alert.setContentText("\u59d3\u540d\u4e0d\u80fd\u4e3a\u7a7a");
            alert.showAndWait();
            return;
        }
        if (gsrcName.length() > 10) {
            alert.setContentText("\u59d3\u540d\u957f\u5ea6\u4e0d\u8d85\u8fc710\u4f4d");
            alert.showAndWait();
            return;
        }
        if (StrUtil.isBlank((CharSequence)gsrcMobile)) {
            alert.setContentText("\u624b\u673a\u4e0d\u80fd\u4e3a\u7a7a");
            alert.showAndWait();
            return;
        }
        if (!ValidationUtil.checkPhone(gsrcMobile)) {
            alert.setContentText("\u8bf7\u8f93\u5165\u6b63\u786e\u624b\u673a\u53f7");
            alert.showAndWait();
            return;
        }
        if (StrUtil.isBlank((CharSequence)gsrcSex)) {
            alert.setContentText("\u6027\u522b\u4e0d\u80fd\u4e3a\u7a7a");
            alert.showAndWait();
            return;
        }
        if (StrUtil.isNotBlank((CharSequence)gsrcTel) && gsrcTel.length() > 15) {
            alert.setContentText("\u7535\u8bdd\u957f\u5ea6\u4e0d\u8d85\u8fc715\u4f4d");
            alert.showAndWait();
            return;
        }
        if (StrUtil.isNotBlank((CharSequence)gsrcAddress) && gsrcAddress.length() > 30) {
            alert.setContentText("\u5730\u5740\u957f\u5ea6\u4e0d\u8d85\u8fc730\u4f4d");
            alert.showAndWait();
            return;
        }
        RechargeCardInData inData = new RechargeCardInData();
        inData.setGsrcId(gsrcId);
        inData.setGsrcName(gsrcName);
        inData.setGsrcMobile(gsrcMobile);
        inData.setGsrcSex(gsrcSex);
        inData.setGsrcTel(gsrcTel);
        inData.setGsrcAddress(gsrcAddress);
        inData.setInsert(!this.save);
        HttpJson rsp = RechargeCardUtil.saveCardInfo(inData);
        if (rsp.isSuccess()) {
            this.save = true;
            alert.setContentText("\u4fdd\u5b58\u6210\u529f");
            alert.showAndWait();
        } else {
            alert.setContentText(rsp.getMsg());
            alert.showAndWait();
        }
    }

    @FXML
    public void generateCardCode() {
        HttpJson rsp = RechargeCardUtil.generateCardCode();
        Alert alert = this.createAlert(Alert.AlertType.INFORMATION, "\u63d0\u793a\u4fe1\u606f", null);
        if (rsp.isSuccess()) {
            this.gsrcIdSave.setText(rsp.getMsg());
            this.cardStatus.setText(RechargeCardStatus.INIT.getName());
            this.gsrcNameSave.setText("");
            this.gsrcMobileSave.setText("");
            this.gsrcSexSave.setValue(null);
            this.gsrcTelSave.setText("");
            this.gsrcAddressSave.setText("");
            this.save = false;
            this.initPayInfo();
            alert.setContentText("\u50a8\u503c\u5361\u53f7\u751f\u6210\u6210\u529f");
            alert.showAndWait();
        } else {
            alert.setContentText(rsp.getMsg());
            alert.showAndWait();
        }
    }

    @FXML
    public void resetPassword() {
        Alert alert = this.createAlert(Alert.AlertType.INFORMATION, "\u63d0\u793a\u4fe1\u606f", null);
        if (!this.save) {
            alert.setContentText("\u8bf7\u5148\u4fdd\u5b58\u50a8\u503c\u5361");
            alert.showAndWait();
            return;
        }
        if (StrUtil.isBlank((CharSequence)this.gsrcIdSave.getText())) {
            alert.setContentText("\u8bf7\u5148\u67e5\u8be2\u50a8\u503c\u5361");
            alert.showAndWait();
            return;
        }
        RechargeCardInData inData = new RechargeCardInData();
        inData.setGsrcId(this.gsrcIdSave.getText());
        HttpJson rsp = RechargeCardUtil.resetPassword(inData);
        if (rsp.isSuccess()) {
            alert.setContentText("\u50a8\u503c\u5361\u5df2\u6210\u529f\u6062\u590d\u521d\u59cb\u5bc6\u7801");
            alert.showAndWait();
        } else {
            alert.setContentText(rsp.getMsg());
            alert.showAndWait();
        }
    }

    @FXML
    public void getCardInfo() {
        RechargeCardInData inData = new RechargeCardInData();
        if (ObjectUtil.isNotNull(this.gsrcIdQuery)) {
            inData.setGsrcId(this.gsrcIdQuery.getText());
        }
        if (ObjectUtil.isNotNull(this.gsrcNameQuery)) {
            inData.setGsrcName(this.gsrcNameQuery.getText());
        }
        if (ObjectUtil.isNotNull(this.gsrcMobileQuery)) {
            inData.setGsrcMobile(this.gsrcMobileQuery.getText());
        }
        Alert alert = this.createAlert(Alert.AlertType.INFORMATION, "\u63d0\u793a\u4fe1\u606f", null);
        if (StrUtil.isBlank((CharSequence)inData.getGsrcId()) && StrUtil.isBlank((CharSequence)inData.getGsrcName()) && StrUtil.isBlank((CharSequence)inData.getGsrcMobile())) {
            alert.setContentText("\u5fc5\u987b\u81f3\u5c11\u586b\u5199\u4e00\u9879\u5185\u5bb9\u8fdb\u884c\u67e5\u8be2\uff01");
            alert.showAndWait();
            return;
        }
        HttpJson rsp = RechargeCardUtil.getCardInfo(inData);
        if (rsp.isSuccess()) {
            this.initPayInfo();
            List dataList = JSON.parseArray((String)rsp.getMsg(), RechargeCardOutData.class);
            if (CollUtil.isEmpty((Collection)dataList)) {
                this.gsrcIdSave.setText("");
                this.gsrcNameSave.setText("");
                this.gsrcMobileSave.setText("");
                this.gsrcTelSave.setText("");
                this.gsrcAddressSave.setText("");
                this.gsrcSexSave.setValue(null);
                this.cardStatus.setText("");
                this.gsrcpBeforeAmtSave.setText("");
                alert.setContentText("\u672a\u67e5\u8be2\u5230\u76f8\u5173\u50a8\u503c\u5361");
                alert.showAndWait();
                return;
            }
            RechargeCardOutData outData = (RechargeCardOutData)dataList.get(0);
            this.gsrcIdSave.setText(outData.getGsrcId());
            this.gsrcNameSave.setText(outData.getGsrcName());
            this.gsrcMobileSave.setText(outData.getGsrcMobile());
            this.gsrcTelSave.setText(outData.getGsrcTel());
            this.gsrcAddressSave.setText(outData.getGsrcAddress());
            this.gsrcpBeforeAmtSave.setText(StrUtil.toString(outData.getGsrcAmt()));
            if (Sex.MALE.getId().equals(outData.getGsrcSex())) {
                this.gsrcSexSave.setValue(Sex.MALE);
            } else {
                this.gsrcSexSave.setValue(Sex.FEMALE);
            }
            this.cardStatus.setText(RechargeCardStatus.getName(outData.getGsrcStatus()));
            this.save = true;
        } else {
            alert.setContentText(rsp.getMsg());
            alert.showAndWait();
        }
    }

    private void showAmt() {
        if (ObjectUtil.isNull(this.gsrcpProportionSave.getValue())) {
            return;
        }
        if (StrUtil.isBlank((CharSequence)this.gsrcpBeforeAmtSave.getText())) {
            return;
        }
        if (StrUtil.isBlank((CharSequence)this.gsrcpPayAmtSave.getText())) {
            return;
        }
        if (!ValidationUtil.checkAmount(this.gsrcpPayAmtSave.getText())) {
            return;
        }
        String proportionOption = ((RechargeProportion)this.gsrcpProportionSave.getValue()).getCode();
        BigDecimal gsrcpProportion = new BigDecimal(proportionOption);
        BigDecimal payAmtSave = new BigDecimal(this.gsrcpPayAmtSave.getText());
        BigDecimal afterAmtSave = payAmtSave.multiply(gsrcpProportion).divide(new BigDecimal("100"));
        String beforeAmt = this.gsrcpBeforeAmtSave.getText();
        BigDecimal rechargeAmt = new BigDecimal(beforeAmt).add(afterAmtSave);
        this.gsrcpAfterAmtSave.setText(afterAmtSave.toString());
        this.gsrcpRechargeAmtSave.setText(rechargeAmt.toString());
    }

    @FXML
    private void showPay() {
        Alert alert = this.createAlert(Alert.AlertType.INFORMATION, "\u63d0\u793a\u4fe1\u606f", null);
        if (!this.save) {
            alert.setContentText("\u8bf7\u5148\u4fdd\u5b58\u50a8\u503c\u5361");
            alert.showAndWait();
            return;
        }
        if (StrUtil.isBlank((CharSequence)this.gsrcIdSave.getText())) {
            alert.setContentText("\u8bf7\u5148\u67e5\u8be2\u50a8\u503c\u5361");
            alert.showAndWait();
            return;
        }
        if (ObjectUtil.isNull(this.gsrcpProportionSave.getValue())) {
            alert.setContentText("\u8bf7\u9009\u62e9\u5145\u503c\u6bd4\u4f8b");
            alert.showAndWait();
            return;
        }
        if (ObjectUtil.isNull(this.rechargeTypeSave.getValue())) {
            alert.setContentText("\u8bf7\u9009\u62e9\u5145\u503c\u7c7b\u578b");
            alert.showAndWait();
            return;
        }
        if (StrUtil.isBlank((CharSequence)this.gsrcpPayAmtSave.getText())) {
            alert.setContentText("\u8bf7\u8f93\u5165\u4ed8\u6b3e\u91d1\u989d");
            alert.showAndWait();
            return;
        }
        if (!ValidationUtil.checkAmount(this.gsrcpPayAmtSave.getText())) {
            alert.setContentText("\u4ed8\u6b3e\u91d1\u989d\u4e0d\u5408\u6cd5");
            alert.showAndWait();
            return;
        }
        if (new BigDecimal(this.gsrcpPayAmtSave.getText()).compareTo(new BigDecimal(((RechargeProportion)this.gsrcpProportionSave.getValue()).getAmt())) < 0) {
            alert.setContentText("\u4ed8\u6b3e\u91d1\u989d\u4e0d\u80fd\u4f4e\u4e8e\u8d77\u5145\u91d1\u989d");
            alert.showAndWait();
            return;
        }
        String rechargeType = ((RechargeType)(this.rechargeTypeSave.getValue())).getId();
        String proportionOption = ((RechargeProportion)this.gsrcpProportionSave.getValue()).getCode();
        BigDecimal gsrcpProportion = new BigDecimal(proportionOption);
        BigDecimal payAmtSave = new BigDecimal(this.gsrcpPayAmtSave.getText());
        BigDecimal afterAmtSave = payAmtSave.multiply(gsrcpProportion).divide(new BigDecimal("100"));
        String beforeAmt = this.gsrcpBeforeAmtSave.getText();
        BigDecimal rechargeAmt = new BigDecimal(beforeAmt).add(afterAmtSave);
        this.gsrcpAfterAmtSave.setText(afterAmtSave.toString());
        this.gsrcpRechargeAmtSave.setText(rechargeAmt.toString());
        RechargeCardPaycheckInData inData = new RechargeCardPaycheckInData();
        inData.setGsrcpCardId(this.gsrcIdSave.getText());
        inData.setGsrcpProportion(proportionOption);
        inData.setGsrcpPayAmt(payAmtSave);
        inData.setGsrcpPromotion(rechargeType);
        inData.setGsrcpAfterAmt(afterAmtSave);
        inData.setGsrcpBeforeAmt(new BigDecimal(beforeAmt));
        inData.setGsrcpRechargeAmt(rechargeAmt);
        inData.setIsCheck(true);
        HttpJson rsp = RechargeCardUtil.savePayinfo(inData);
        if (rsp.isSuccess()) {
            this.rechargePayController.init();
            CommonUtil.showView(IndexView.class, Modality.APPLICATION_MODAL);
        } else {
            alert.setContentText(rsp.getMsg());
            alert.showAndWait();
        }
    }

    @FXML
    public void confirmPay() {
        Alert alert = this.createAlert(Alert.AlertType.INFORMATION, "\u63d0\u793a\u4fe1\u606f", null);
        String rechargeType = ((RechargeType)(this.rechargeTypeSave.getValue())).getId();
        String proportionOption = ((RechargeProportion)this.gsrcpProportionSave.getValue()).getCode();
        BigDecimal gsrcpProportion = new BigDecimal(proportionOption);
        BigDecimal payAmtSave = new BigDecimal(this.gsrcpPayAmtSave.getText());
        BigDecimal afterAmtSave = payAmtSave.multiply(gsrcpProportion).divide(new BigDecimal("100"));
        String beforeAmt = this.gsrcpBeforeAmtSave.getText();
        BigDecimal rechargeAmt = new BigDecimal(beforeAmt).add(afterAmtSave);
        this.gsrcpAfterAmtSave.setText(afterAmtSave.toString());
        this.gsrcpRechargeAmtSave.setText(rechargeAmt.toString());
        RechargeCardPaycheckInData inData = new RechargeCardPaycheckInData();
        inData.setGsrcpCardId(this.gsrcIdSave.getText());
        inData.setGsrcpProportion(proportionOption);
        inData.setGsrcpPayAmt(payAmtSave);
        inData.setGsrcpPromotion(rechargeType);
        inData.setGsrcpAfterAmt(afterAmtSave);
        inData.setGsrcpBeforeAmt(new BigDecimal(beforeAmt));
        inData.setGsrcpRechargeAmt(rechargeAmt);
        inData.setIsCheck(false);
        HttpJson rsp = RechargeCardUtil.savePayinfo(inData);
        if (rsp.isSuccess()) {
            this.getCardInfo();
            alert.setContentText("\u5df2\u786e\u8ba4\u652f\u4ed8");
            alert.showAndWait();
        } else {
            alert.setContentText(rsp.getMsg());
            alert.showAndWait();
        }
    }

    @FXML
    public void toModifyPassword() throws IOException {
        Alert alert = this.createAlert(Alert.AlertType.INFORMATION, "\u63d0\u793a\u4fe1\u606f", null);
        if (!this.save) {
            alert.setContentText("\u8bf7\u5148\u4fdd\u5b58\u50a8\u503c\u5361");
            alert.showAndWait();
            return;
        }
        if (StrUtil.isBlank((CharSequence)this.gsrcIdSave.getText())) {
            alert.setContentText("\u8bf7\u5148\u67e5\u8be2\u50a8\u503c\u5361");
            alert.showAndWait();
            return;
        }
        this.isForward = true;
        Parent target = (Parent)FXMLLoader.load((URL)this.getClass().getResource("/fxml/rechargecard/passwordmodify.fxml"));
        Scene scene = new Scene(target);
        this.stg = new Stage();
        this.stg.setScene(scene);
        this.stg.show();
    }

    @FXML
    public void toUseMemberCard() throws IOException {
        this.isForward = true;
        this.save = false;
        MemberCardQueryController controller = (MemberCardQueryController)SpringUtil.getBean("memberCardQueryController");
        Parent target = (Parent)FXMLLoader.load((URL)this.getClass().getResource("/fxml/rechargecard/membercardquery.fxml"));
        Scene scene = new Scene(target);
        this.stg = new Stage();
        this.stg.setScene(scene);
        this.stg.show();
    }

    public void initPayInfo() {
        this.gsrcpProportionSave.setValue(null);
        this.rechargeTypeSave.setValue(null);
        this.gsrcpPayAmtSave.setText("");
        this.gsrcpAfterAmtSave.setText("");
        this.gsrcpBeforeAmtSave.setText("0");
        this.gsrcpRechargeAmtSave.setText("");
    }

    public ScrollPane getScrollPane() {
        return this.scrollPane;
    }

    public VBox getVBox() {
        return this.vBox;
    }

    public TextField getGsrcIdSave() {
        return this.gsrcIdSave;
    }

    public TextField getGsrcNameSave() {
        return this.gsrcNameSave;
    }

    public TextField getGsrcMobileSave() {
        return this.gsrcMobileSave;
    }

    public ChoiceBox<Sex> getGsrcSexSave() {
        return this.gsrcSexSave;
    }

    public TextField getGsrcTelSave() {
        return this.gsrcTelSave;
    }

    public TextArea getGsrcAddressSave() {
        return this.gsrcAddressSave;
    }

    public TextField getGsrcIdQuery() {
        return this.gsrcIdQuery;
    }

    public TextField getGsrcNameQuery() {
        return this.gsrcNameQuery;
    }

    public TextField getGsrcMobileQuery() {
        return this.gsrcMobileQuery;
    }

    public ChoiceBox<RechargeProportion> getGsrcpProportionSave() {
        return this.gsrcpProportionSave;
    }

    public TextField getGsrcpPayAmtSave() {
        return this.gsrcpPayAmtSave;
    }

    public TextField getGsrcpAfterAmtSave() {
        return this.gsrcpAfterAmtSave;
    }

    public ChoiceBox<RechargeType> getRechargeTypeSave() {
        return this.rechargeTypeSave;
    }

    public TextField getGsrcpBeforeAmtSave() {
        return this.gsrcpBeforeAmtSave;
    }

    public TextField getGsrcpRechargeAmtSave() {
        return this.gsrcpRechargeAmtSave;
    }

    public TextField getGsrcIdModify() {
        return this.gsrcIdModify;
    }

    public TextField getCardStatus() {
        return this.cardStatus;
    }

    public RechargePayController getRechargePayController() {
        return this.rechargePayController;
    }

    public Stage getStg() {
        return this.stg;
    }

    public boolean isForward() {
        return this.isForward;
    }

    public boolean isSave() {
        return this.save;
    }

    public void setScrollPane(ScrollPane scrollPane) {
        this.scrollPane = scrollPane;
    }

    public void setVBox(VBox vBox) {
        this.vBox = vBox;
    }

    public void setGsrcIdSave(TextField gsrcIdSave) {
        this.gsrcIdSave = gsrcIdSave;
    }

    public void setGsrcNameSave(TextField gsrcNameSave) {
        this.gsrcNameSave = gsrcNameSave;
    }

    public void setGsrcMobileSave(TextField gsrcMobileSave) {
        this.gsrcMobileSave = gsrcMobileSave;
    }

    public void setGsrcSexSave(ChoiceBox<Sex> gsrcSexSave) {
        this.gsrcSexSave = gsrcSexSave;
    }

    public void setGsrcTelSave(TextField gsrcTelSave) {
        this.gsrcTelSave = gsrcTelSave;
    }

    public void setGsrcAddressSave(TextArea gsrcAddressSave) {
        this.gsrcAddressSave = gsrcAddressSave;
    }

    public void setGsrcIdQuery(TextField gsrcIdQuery) {
        this.gsrcIdQuery = gsrcIdQuery;
    }

    public void setGsrcNameQuery(TextField gsrcNameQuery) {
        this.gsrcNameQuery = gsrcNameQuery;
    }

    public void setGsrcMobileQuery(TextField gsrcMobileQuery) {
        this.gsrcMobileQuery = gsrcMobileQuery;
    }

    public void setGsrcpProportionSave(ChoiceBox<RechargeProportion> gsrcpProportionSave) {
        this.gsrcpProportionSave = gsrcpProportionSave;
    }

    public void setGsrcpPayAmtSave(TextField gsrcpPayAmtSave) {
        this.gsrcpPayAmtSave = gsrcpPayAmtSave;
    }

    public void setGsrcpAfterAmtSave(TextField gsrcpAfterAmtSave) {
        this.gsrcpAfterAmtSave = gsrcpAfterAmtSave;
    }

    public void setRechargeTypeSave(ChoiceBox<RechargeType> rechargeTypeSave) {
        this.rechargeTypeSave = rechargeTypeSave;
    }

    public void setGsrcpBeforeAmtSave(TextField gsrcpBeforeAmtSave) {
        this.gsrcpBeforeAmtSave = gsrcpBeforeAmtSave;
    }

    public void setGsrcpRechargeAmtSave(TextField gsrcpRechargeAmtSave) {
        this.gsrcpRechargeAmtSave = gsrcpRechargeAmtSave;
    }

    public void setGsrcIdModify(TextField gsrcIdModify) {
        this.gsrcIdModify = gsrcIdModify;
    }

    public void setCardStatus(TextField cardStatus) {
        this.cardStatus = cardStatus;
    }

    public void setRechargePayController(RechargePayController rechargePayController) {
        this.rechargePayController = rechargePayController;
    }

    public void setStg(Stage stg) {
        this.stg = stg;
    }

    public void setForward(boolean isForward) {
        this.isForward = isForward;
    }

    public void setSave(boolean save) {
        this.save = save;
    }

    public boolean equals(Object o) {
        if (o == this) {
            return true;
        }
        if (!(o instanceof RechargecardController)) {
            return false;
        }
        RechargecardController other = (RechargecardController)o;
        if (!other.canEqual(this)) {
            return false;
        }
        ScrollPane this$scrollPane = this.getScrollPane();
        ScrollPane other$scrollPane = other.getScrollPane();
        if (this$scrollPane == null ? other$scrollPane != null : !this$scrollPane.equals(other$scrollPane)) {
            return false;
        }
        VBox this$vBox = this.getVBox();
        VBox other$vBox = other.getVBox();
        if (this$vBox == null ? other$vBox != null : !this$vBox.equals(other$vBox)) {
            return false;
        }
        TextField this$gsrcIdSave = this.getGsrcIdSave();
        TextField other$gsrcIdSave = other.getGsrcIdSave();
        if (this$gsrcIdSave == null ? other$gsrcIdSave != null : !this$gsrcIdSave.equals(other$gsrcIdSave)) {
            return false;
        }
        TextField this$gsrcNameSave = this.getGsrcNameSave();
        TextField other$gsrcNameSave = other.getGsrcNameSave();
        if (this$gsrcNameSave == null ? other$gsrcNameSave != null : !this$gsrcNameSave.equals(other$gsrcNameSave)) {
            return false;
        }
        TextField this$gsrcMobileSave = this.getGsrcMobileSave();
        TextField other$gsrcMobileSave = other.getGsrcMobileSave();
        if (this$gsrcMobileSave == null ? other$gsrcMobileSave != null : !this$gsrcMobileSave.equals(other$gsrcMobileSave)) {
            return false;
        }
        ChoiceBox<Sex> this$gsrcSexSave = this.getGsrcSexSave();
        ChoiceBox<Sex> other$gsrcSexSave = other.getGsrcSexSave();
        if (this$gsrcSexSave == null ? other$gsrcSexSave != null : !this$gsrcSexSave.equals(other$gsrcSexSave)) {
            return false;
        }
        TextField this$gsrcTelSave = this.getGsrcTelSave();
        TextField other$gsrcTelSave = other.getGsrcTelSave();
        if (this$gsrcTelSave == null ? other$gsrcTelSave != null : !this$gsrcTelSave.equals(other$gsrcTelSave)) {
            return false;
        }
        TextArea this$gsrcAddressSave = this.getGsrcAddressSave();
        TextArea other$gsrcAddressSave = other.getGsrcAddressSave();
        if (this$gsrcAddressSave == null ? other$gsrcAddressSave != null : !this$gsrcAddressSave.equals(other$gsrcAddressSave)) {
            return false;
        }
        TextField this$gsrcIdQuery = this.getGsrcIdQuery();
        TextField other$gsrcIdQuery = other.getGsrcIdQuery();
        if (this$gsrcIdQuery == null ? other$gsrcIdQuery != null : !this$gsrcIdQuery.equals(other$gsrcIdQuery)) {
            return false;
        }
        TextField this$gsrcNameQuery = this.getGsrcNameQuery();
        TextField other$gsrcNameQuery = other.getGsrcNameQuery();
        if (this$gsrcNameQuery == null ? other$gsrcNameQuery != null : !this$gsrcNameQuery.equals(other$gsrcNameQuery)) {
            return false;
        }
        TextField this$gsrcMobileQuery = this.getGsrcMobileQuery();
        TextField other$gsrcMobileQuery = other.getGsrcMobileQuery();
        if (this$gsrcMobileQuery == null ? other$gsrcMobileQuery != null : !this$gsrcMobileQuery.equals(other$gsrcMobileQuery)) {
            return false;
        }
        ChoiceBox<RechargeProportion> this$gsrcpProportionSave = this.getGsrcpProportionSave();
        ChoiceBox<RechargeProportion> other$gsrcpProportionSave = other.getGsrcpProportionSave();
        if (this$gsrcpProportionSave == null ? other$gsrcpProportionSave != null : !this$gsrcpProportionSave.equals(other$gsrcpProportionSave)) {
            return false;
        }
        TextField this$gsrcpPayAmtSave = this.getGsrcpPayAmtSave();
        TextField other$gsrcpPayAmtSave = other.getGsrcpPayAmtSave();
        if (this$gsrcpPayAmtSave == null ? other$gsrcpPayAmtSave != null : !this$gsrcpPayAmtSave.equals(other$gsrcpPayAmtSave)) {
            return false;
        }
        TextField this$gsrcpAfterAmtSave = this.getGsrcpAfterAmtSave();
        TextField other$gsrcpAfterAmtSave = other.getGsrcpAfterAmtSave();
        if (this$gsrcpAfterAmtSave == null ? other$gsrcpAfterAmtSave != null : !this$gsrcpAfterAmtSave.equals(other$gsrcpAfterAmtSave)) {
            return false;
        }
        ChoiceBox<RechargeType> this$rechargeTypeSave = this.getRechargeTypeSave();
        ChoiceBox<RechargeType> other$rechargeTypeSave = other.getRechargeTypeSave();
        if (this$rechargeTypeSave == null ? other$rechargeTypeSave != null : !this$rechargeTypeSave.equals(other$rechargeTypeSave)) {
            return false;
        }
        TextField this$gsrcpBeforeAmtSave = this.getGsrcpBeforeAmtSave();
        TextField other$gsrcpBeforeAmtSave = other.getGsrcpBeforeAmtSave();
        if (this$gsrcpBeforeAmtSave == null ? other$gsrcpBeforeAmtSave != null : !this$gsrcpBeforeAmtSave.equals(other$gsrcpBeforeAmtSave)) {
            return false;
        }
        TextField this$gsrcpRechargeAmtSave = this.getGsrcpRechargeAmtSave();
        TextField other$gsrcpRechargeAmtSave = other.getGsrcpRechargeAmtSave();
        if (this$gsrcpRechargeAmtSave == null ? other$gsrcpRechargeAmtSave != null : !this$gsrcpRechargeAmtSave.equals(other$gsrcpRechargeAmtSave)) {
            return false;
        }
        TextField this$gsrcIdModify = this.getGsrcIdModify();
        TextField other$gsrcIdModify = other.getGsrcIdModify();
        if (this$gsrcIdModify == null ? other$gsrcIdModify != null : !this$gsrcIdModify.equals(other$gsrcIdModify)) {
            return false;
        }
        TextField this$cardStatus = this.getCardStatus();
        TextField other$cardStatus = other.getCardStatus();
        if (this$cardStatus == null ? other$cardStatus != null : !this$cardStatus.equals(other$cardStatus)) {
            return false;
        }
        RechargePayController this$rechargePayController = this.getRechargePayController();
        RechargePayController other$rechargePayController = other.getRechargePayController();
        if (this$rechargePayController == null ? other$rechargePayController != null : !(this$rechargePayController).equals(other$rechargePayController)) {
            return false;
        }
        Stage this$stg = this.getStg();
        Stage other$stg = other.getStg();
        if (this$stg == null ? other$stg != null : !this$stg.equals(other$stg)) {
            return false;
        }
        if (this.isForward() != other.isForward()) {
            return false;
        }
        return this.isSave() == other.isSave();
    }

    protected boolean canEqual(Object other) {
        return other instanceof RechargecardController;
    }

    public int hashCode() {
        int PRIME = 59;
        int result = 1;
        ScrollPane $scrollPane = this.getScrollPane();
        result = result * 59 + ($scrollPane == null ? 43 : $scrollPane.hashCode());
        VBox $vBox = this.getVBox();
        result = result * 59 + ($vBox == null ? 43 : $vBox.hashCode());
        TextField $gsrcIdSave = this.getGsrcIdSave();
        result = result * 59 + ($gsrcIdSave == null ? 43 : $gsrcIdSave.hashCode());
        TextField $gsrcNameSave = this.getGsrcNameSave();
        result = result * 59 + ($gsrcNameSave == null ? 43 : $gsrcNameSave.hashCode());
        TextField $gsrcMobileSave = this.getGsrcMobileSave();
        result = result * 59 + ($gsrcMobileSave == null ? 43 : $gsrcMobileSave.hashCode());
        ChoiceBox<Sex> $gsrcSexSave = this.getGsrcSexSave();
        result = result * 59 + ($gsrcSexSave == null ? 43 : $gsrcSexSave.hashCode());
        TextField $gsrcTelSave = this.getGsrcTelSave();
        result = result * 59 + ($gsrcTelSave == null ? 43 : $gsrcTelSave.hashCode());
        TextArea $gsrcAddressSave = this.getGsrcAddressSave();
        result = result * 59 + ($gsrcAddressSave == null ? 43 : $gsrcAddressSave.hashCode());
        TextField $gsrcIdQuery = this.getGsrcIdQuery();
        result = result * 59 + ($gsrcIdQuery == null ? 43 : $gsrcIdQuery.hashCode());
        TextField $gsrcNameQuery = this.getGsrcNameQuery();
        result = result * 59 + ($gsrcNameQuery == null ? 43 : $gsrcNameQuery.hashCode());
        TextField $gsrcMobileQuery = this.getGsrcMobileQuery();
        result = result * 59 + ($gsrcMobileQuery == null ? 43 : $gsrcMobileQuery.hashCode());
        ChoiceBox<RechargeProportion> $gsrcpProportionSave = this.getGsrcpProportionSave();
        result = result * 59 + ($gsrcpProportionSave == null ? 43 : $gsrcpProportionSave.hashCode());
        TextField $gsrcpPayAmtSave = this.getGsrcpPayAmtSave();
        result = result * 59 + ($gsrcpPayAmtSave == null ? 43 : $gsrcpPayAmtSave.hashCode());
        TextField $gsrcpAfterAmtSave = this.getGsrcpAfterAmtSave();
        result = result * 59 + ($gsrcpAfterAmtSave == null ? 43 : $gsrcpAfterAmtSave.hashCode());
        ChoiceBox<RechargeType> $rechargeTypeSave = this.getRechargeTypeSave();
        result = result * 59 + ($rechargeTypeSave == null ? 43 : $rechargeTypeSave.hashCode());
        TextField $gsrcpBeforeAmtSave = this.getGsrcpBeforeAmtSave();
        result = result * 59 + ($gsrcpBeforeAmtSave == null ? 43 : $gsrcpBeforeAmtSave.hashCode());
        TextField $gsrcpRechargeAmtSave = this.getGsrcpRechargeAmtSave();
        result = result * 59 + ($gsrcpRechargeAmtSave == null ? 43 : $gsrcpRechargeAmtSave.hashCode());
        TextField $gsrcIdModify = this.getGsrcIdModify();
        result = result * 59 + ($gsrcIdModify == null ? 43 : $gsrcIdModify.hashCode());
        TextField $cardStatus = this.getCardStatus();
        result = result * 59 + ($cardStatus == null ? 43 : $cardStatus.hashCode());
        RechargePayController $rechargePayController = this.getRechargePayController();
        result = result * 59 + ($rechargePayController == null ? 43 : ($rechargePayController).hashCode());
        Stage $stg = this.getStg();
        result = result * 59 + ($stg == null ? 43 : $stg.hashCode());
        result = result * 59 + (this.isForward() ? 79 : 97);
        result = result * 59 + (this.isSave() ? 79 : 97);
        return result;
    }

    public String toString() {
        return "RechargecardController(scrollPane=" + this.getScrollPane() + ", vBox=" + this.getVBox() + ", gsrcIdSave=" + this.getGsrcIdSave() + ", gsrcNameSave=" + this.getGsrcNameSave() + ", gsrcMobileSave=" + this.getGsrcMobileSave() + ", gsrcSexSave=" + this.getGsrcSexSave() + ", gsrcTelSave=" + this.getGsrcTelSave() + ", gsrcAddressSave=" + this.getGsrcAddressSave() + ", gsrcIdQuery=" + this.getGsrcIdQuery() + ", gsrcNameQuery=" + this.getGsrcNameQuery() + ", gsrcMobileQuery=" + this.getGsrcMobileQuery() + ", gsrcpProportionSave=" + this.getGsrcpProportionSave() + ", gsrcpPayAmtSave=" + this.getGsrcpPayAmtSave() + ", gsrcpAfterAmtSave=" + this.getGsrcpAfterAmtSave() + ", rechargeTypeSave=" + this.getRechargeTypeSave() + ", gsrcpBeforeAmtSave=" + this.getGsrcpBeforeAmtSave() + ", gsrcpRechargeAmtSave=" + this.getGsrcpRechargeAmtSave() + ", gsrcIdModify=" + this.getGsrcIdModify() + ", cardStatus=" + this.getCardStatus() + ", rechargePayController=" + this.getRechargePayController() + ", stg=" + this.getStg() + ", isForward=" + this.isForward() + ", save=" + this.isSave() + ")";
    }
}

